package com.spzx.product.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.spzx.common.core.web.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.util.List;

//商品： 分类、品牌、分类品牌、规格参数、
@Data
@Schema(description = "商品规格参数")
public class ProductSpec extends BaseEntity {
    @Schema(description = "三级分类id")
    @NotNull
    private Long categoryId;
    // 小米手机
    @Schema(description = "规格名称")
    @NotEmpty
    private String specName;
    // ”[{key:'颜色' , values: ['白','黑'] },{'key':'内存',values:[6,8,12]}]“
    @Schema(description = "规格参数和值")
    @NotEmpty
    private String specValue;
    @Schema(description = "规格三级分类名称")
    @TableField(exist = false)
    private String categoryName;

    @Schema(description = "分类品牌的一二三级分类id")
    @TableField(exist = false)
    private List<Long> categoryIdList;
}
